package cn.cake.reptile.fetcher;

import cn.cake.reptile.conf.DefaultConfigured;

/**
 * 抓取器
 *
 * @author mengll
 * @date 2019/1/3 14:34
 */
public class Fetcher extends DefaultConfigured {

    private Executor executor;

    private volatile boolean running;
    private int threads = 20;

    public Executor getExecutor() {
        return executor;
    }

    public void setExecutor(Executor executor) {
        this.executor = executor;
    }

    private static class FetchQueue {

    }

    private class FetchTasker implements Runnable {

        @Override
        public void run() {

        }
    }

    public void stop() {
        running = false;
    }

    public void setThreads(int threads) {
        this.threads = threads;
    }
}
